package com.example.demo.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.math.BigDecimal;

@Table(value = "orders")
@Data
public class OrderEntity extends BaseEntity {
    @Id(keyType = KeyType.Auto)
    private Long id;

    private String orderNumber;

    private Long userId;

    private BigDecimal totalAmount;

    private String status;

    // Constructors
    public OrderEntity() {}

    public OrderEntity(String orderNumber, Long userId, BigDecimal totalAmount, String status) {
        this.orderNumber = orderNumber;
        this.userId = userId;
        this.totalAmount = totalAmount;
        this.status = status;
    }

}
